<!--
 * @Author: HeAo
 * @Date: 2022-07-25 10:23:23
 * @LastEditTime: 2022-08-30 09:04:53
 * @LastEditors: HeAo
 * @Description: 
 * @FilePath: \HTML5&CSS3\第七天\5-网易严选宫格.html
 * 别乱动！
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>宫格</title>
  <style>
    .container {
      width: 800px;
      height: 600px;
      background-color: #eee;
      margin: 0 auto;


    }

    /* 第一个div */
    .container>div:first-child {
      width: 230px;
      height: 600px;
      background-color: antiquewhite;
      margin-left: 0;
    }

    /* 剩余的div */
    .container>div {
      width: 180px;
      height: 295px;
      margin-left: 10px;
      background-color: pink;
      float: left;
    }

    /* 伪类选择器 */
    .container>div:nth-child(n+5) {
      margin-top: 10px;
      background-color: rgb(241, 232, 178);
    }
  </style>
</head>

<body>
  <div class="container">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>

</body>

</html>